package com.it;

import cn.hutool.json.JSONUtil;
import com.it.bean.User;
import com.it.mapper.UserMapper;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@Slf4j
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
class ExamApplicationTests {

    @Autowired
    private UserMapper userMapper;

    @Test
    public void contextLoads(){
        User user = userMapper.selectByPrimaryKey(1);
        System.out.println(JSONUtil.toJsonStr(user));
    }
}
